import request from '@/utils/request'

// 分页获取订单列表
export const getArticleList = (query) => {
  return request({
    url: '/business/article/list',
    method: 'get',
    params: query
  })
}

// 根据订单Id获取详细信息
export const getArticleById = (articleId) => {
  return request({
    url: `/business/article/${articleId}`,
    method: 'get'
  })
}

// 增加订单
export const addArticle = (data) => {
  return request({
    url: '/business/article',
    method: 'post',
    data
  })
}

// 修改订单
export const modifyArticle = (data) => {
  return request({
    url: `/business/article`,
    method: 'put',
    data
  })
}

// 删除订单
export const delArticle = (articleIds) => {
  return request({
    url: `/business/article/${articleIds}`,
    method: 'delete'
  })
}
